home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
tex-k
/
tex-k-archive.past
/
1995.02
/
000055_vieth@thphy.uni-duesseldorf.de_Fri Feb 10 17:49:29 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1995-02-28
|
4KB
Received: from thphy.uni-duesseldorf.de (xerxes.thphy.uni-duesseldorf.de) by cs.umb.edu with SMTP id AA13425
(5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Fri, 10 Feb 1995 15:35:57 -0500
Received: from macbeth.thphy.uni-duesseldorf.de.thphy.uni-duesseldorf.de by thphy.uni-duesseldorf.de (4.1/SMI-4.1)
id AA08650; Fri, 10 Feb 95 16:49:29 +0100
Date: Fri, 10 Feb 95 16:49:29 +0100
From: vieth@xerxes.thphy.uni-duesseldorf.de
Message-Id: <9502101549.AA08650@thphy.uni-duesseldorf.de>
Received: by macbeth.thphy.uni-duesseldorf.de.thphy.uni-duesseldorf.de (4.1/SMI-4.1)
id AA07990; Fri, 10 Feb 95 16:48:31 +0100
To: tex-k@cs.umb.edu
Subject: Missing patch for MetaPost
Hi folks,
it was pointed out to me in private mail that I forgot something when
I posted my patches to adapt MetaPost for web2c-6.1 last week.
Below is the missing patch for web2c/lib/openinout.c. It includes the
code for callmakempx (taken from mpext.c). Hope that was all I forgot.
Have fun with MetaPost,
Ulrik Vieth.
*** web2c/lib/openinout.c.save Wed Jan 11 10:56:38 1995
--- web2c/lib/openinout.c Wed Feb 1 12:13:16 1995
***************
*** 23,31 ****
#ifdef TeX
#include "texd.h"
! #else /* Metafont */
#include "mfd.h"
#endif
#ifdef FUNNY_CORE_DUMP
/* This is defined in texmf.c. */
--- 23,35 ----
#ifdef TeX
#include "texd.h"
! #endif
! #ifdef MF
#include "mfd.h"
#endif
+ #ifdef MP
+ #include "mpd.h"
+ #endif
#ifdef FUNNY_CORE_DUMP
/* This is defined in texmf.c. */
***************
*** 57,63 ****
funny_core_dump ();
#endif /* FUNNY_CORE_DUMP and not BibTeX */
! #ifdef BibTeX
if (path_index == NO_FILE_PATH)
{
unsigned temp_length;
--- 61,67 ----
funny_core_dump ();
#endif /* FUNNY_CORE_DUMP and not BibTeX */
! #if defined(BibTeX) || defined(MP)
if (path_index == NO_FILE_PATH)
{
unsigned temp_length;
***************
*** 74,80 ****
}
else
! #endif /* BibTeX */
if (testreadaccess (nameoffile, path_index))
{
--- 78,84 ----
}
else
! #endif /* BibTeX || MP */
if (testreadaccess (nameoffile, path_index))
{
***************
*** 99,105 ****
else
namelength = strchr (nameoffile + 1, ' ') - nameoffile - 1;
! #ifdef TeX
/* If we just opened a TFM file, we have to read the first byte,
since TeX wants to look at it. What a kludge. */
if (path_index == TFMFILEPATH)
--- 103,109 ----
else
namelength = strchr (nameoffile + 1, ' ') - nameoffile - 1;
! #if defined(TeX) || defined(MP)
/* If we just opened a TFM file, we have to read the first byte,
since TeX wants to look at it. What a kludge. */
if (path_index == TFMFILEPATH)
***************
*** 107,113 ****
extern integer tfmtemp;
tfmtemp = getc (*f);
}
! #endif /* TeX */
openable = true;
}
--- 111,117 ----
extern integer tfmtemp;
tfmtemp = getc (*f);
}
! #endif /* TeX || MP */
openable = true;
}
***************
*** 243,245 ****
--- 247,289 ----
return ret;
}
+
+ /**********************************************************
+ The following is needed by MetaPost but not METAFONT
+ **********************************************************/
+
+ #define CMDLENGTH 300
+
+ /*
+ * Invoke makempx to make sure there is an up-to-date .mpx file
+ * for a given .mp file
+ *
+ * John Hobby 3/14/90
+ */
+
+ #ifdef MP
+ boolean callmakempx(mpname, mpxname)
+ char *mpname, *mpxname;
+ {
+ char *cmd, *p, *q, *qlimit;
+ char buf[CMDLENGTH];
+
+ cmd = getenv("MPXCOMMAND");
+ if (cmd==NULL)
+ if (troffmode) cmd=TROFFMPX; else cmd=MPXCOMMAND;
+
+ q = buf;
+ qlimit = buf+CMDLENGTH-1;
+ for (p=cmd; *p!=0; p++)
+ if (q==qlimit) return 0; else *q++ = *p;
+ *q++ = ' ';
+ for (p=mpname+1; *p!=0 && *p!=' '; p++)
+ if (q==qlimit) return 0; else *q++ = *p;
+ *q++ = ' ';
+ for (p=mpxname+1; *p!=0 && *p!=' '; p++)
+ if (q==qlimit) return 0; else *q++ = *p;
+ *q = 0;
+ return system(buf)==0;
+ }
+ #endif /* MP */
+